implementing the login logic
also deleted unnecessary files