added login functionality
added logout function