created login functionality