working Login and Register form