Preparing some logic for login,php