Got form submitting working
Added better login logic