rewrote login

MERGE THIS