Improved tests. Added login validation. Refractored UI