Refactored selects.
Implemented simple login system.