implemented logedin user functionlaity