Some new stuff for login implementation