updated model and completed UserLogin.php