Custom Page Login Issue

Hi,
I’ve created one custom login page. I’ve taken command button as login button and used following code to authenticate user.

[b]IDirectorySession session = DirectorySystemFactory.getDirectorySystem().createSession();
IDirectoryUser userlogin = session.authenticateUser(this.userName, this.password);
log("######## Logged in user name : " + userlogin.getFirstName());
String redirectURL = “http://localhost:8585/user.current.start.page”;

	getFacesContext().getExternalContext().redirect(redirectURL);[/b][i]

for usser name I’ve taken simple text input and for password i used secret input and passed its value to above code.

My problem is after publishing when i got to /folder/system/portlet/myproject/customLoginPage and open my portlet and if i pass user name and password and click on login it works fine. but if i create a Custom Login Page and create new LoginPageRule to use it as main login page then after passing user name and password when i click on login button its action does not get executed. It just refreshed my custom login page and does nothing. On server log i just see following entry:

2014-04-24 16:11:43 SAST (Framework:INFO) [RID:3556] - [1sejovirqxwg3ffcctq5wszcl:Guest] - http://localhost:8585/meta/default/folder/0000007753 (POST)
2014-04-24 16:11:43 SAST (Framework:INFO) [RID:3556] - Completed request. Response time=17ms

I do not understand this behavior. Why action does not get executed when it is clicked from login page.

Please let me know if i am doing anything wrong or missing any configuration.