Login stuff fixed attempt 3