Fixed the login and created auth controller.
Added the custome security helper and some other modifications.