Cleaned up LoginActivity Code

Added more detailed comments, cleaned up style, eliminated redundancy.