added secure log-in facility using an encrypted token stored both on db and client. also added helper method for retrevening crrent signed in user and storing cooky data