Login function skeleton and fixing some warnings