Fixed minor errors, implemented correct and working login