Login functions completed

Added delegate for login