You have to do following thing:
1) Set up an SSL cert on your server.
2) Forward or Link to an absolute URL (with https:// at the beginning) when going to login page.
3) Forward to an absolute URL .after successful authentication.
4) Include a check in the login page code to only accept https connections.