Login feature added, terrible code, needs cleaning