Setting up user logic