Apex class for LoginPage in salesforce