adding register form and logout function