finally login function is working
added logout function