refactored session encryption
edited spacing in spec files
implemented :authenticate_user method in ApplicationController
changed User queries to use 'find_by' as those methods simply return nil when no record matches
refeactored functionality since adding authentication in ApplicationController