validation for login

added validation for login via cookie and session for 30 minutes expiry